module.exports = {
    type: 'topTab',
    tabMode: 'fixed',
    actions: [{
        title: '搜索',
        onClick: async function() {
            let keyword = await $input.prompt({
                title: '输入要搜索的内容',
                value: ''
            })
            $router.to($route('searchpage', {keyword: encodeURI(keyword)
            }))
        }
    }],
    fetch() {
        return [{
                title: '首页',
                route: $route('top', {fl:'700001'}),
            }, {
                title: '排行榜',
                route: $route('top',{fl:'700022'})
            }, {
                title: '长生殿',
                route: $route('top' ,{fl:'700017'})
            }/*,
            {
                title: 'other',
                route: $route('top' )
            }*/
        ]
    },
    onClick(item) {
        $ui.toast(`Clicked ${item.title}`)
    }
}